<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
	    <div class="btn-toolbar">
		    <button class="btn btn-primary putcollect"  style="display:none;position:relative;float:right;padding:3px 6px;margin-right:10px">采集更新</button>
		    <form>
		    	<label style="display: inline;">商品名称：</label><input class="input input-medium" type="text" name="omg_title" value="<?=I('get.omg_title')?>" />
		    	<input type="hidden" value="<?=I('get.res')?>" name="res" />
		    	<button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 搜索</button>
		    </form>
		</div>
		<hr>
		<table class="table">
		      <thead>
		        <tr>
		          <th style="text-align:center">商品id</th>
		          <th style="text-align:center">商品图片</th>
		          <th style="text-align:left">商品标题</th>
		          <th style="text-align:center">总销量</th>
		          <th style="text-align:center">商品价格</th>
		          <th style="text-align:center">监测起点</th>
		      	  <th style="text-align:center">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($getData){foreach($getData AS $key=>$val){ ?>
		        <tr> 
		          <td style="text-align:center;vertical-align:middle"><?=$val['sku_id']?></td>
		          <td style="text-align:center;vertical-align:middle"><img src="http://images.100fua.com/<?=$val['omg_pic']?>" style="width:100px" /></td>
		          <td style="text-align:left;vertical-align:middle"><a href="http://<?=$val['omg_url']?>" target="_blank"><?=$val['omg_title']?></a></td>
		          <td style="text-align:center;vertical-align:middle"><?=$val['omg_sales']?> 件</td>
		          <td style="text-align:center;vertical-align:middle">偶买咖：<?=$val['omg_price']?> 元
		          <?php if($val['kl_url']){?>
		         	<p style="color:red">考拉价：<?=$val['kl_price']?></p>
		          <?php }else{?>
		          	<p style="color:red">考拉未匹配</p>
		          <?php }?>		          </td>
		          <td style="text-align:center;vertical-align:middle"><?=date('Y-m-d',$val['add_at'])?></td>
		          <td style="text-align:center;vertical-align:middle">
		              <a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/omg/addGoods" data-width="770" data-height="730" style="padding: 0px 4px;" data-title="匹配考拉" data-params="sku_id/<?=$val['sku_id']?>"><i class="icon-pencil"></i></a>&nbsp;&nbsp;
                      <a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/omg/getCount" data-width="970" data-height="930" style="padding: 0px 4px;" data-title="数据统计" data-params="sku_id/<?=$val['sku_id']?>"><i class="icon-filter"></i></a>
                      <!--<a class="btn btn-info lineCount" href="javascript:void(0)" style="padding: 0px 4px;"><i class="icon-filter"></i></a>-->
		          </td>
		        </tr>
		        <?php }}else{?>
		        <tr><td style="text-align:center;vertical-align:middle" colspan=5>暂无数据</td></tr>
		        <?php }?>-+
		        
		        
		      </tbody>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	/*$('.lineCount').click(function(){
		art.dialog.open('/omg/getCount/ifm/1/ref/1/sku_id/<?=$val['sku_id']?>',
				{
					id: 'SETCHOSEID',
					width: '100%',
				    height: '100%',
				    left: '0%',
				    top: '0%',
				    fixed: true,
				    resize: true,
				    drag: false,
				    title: '数据统计'
				});
	});*/
	$('.deproject').live('click',function(){
		if(!window.confirm('确认删除吗 ?')){
			return false;
		}
		window.location = $(this).attr('href');
	});
	$('.putcollect').click(function(){
		art.dialog({
			title: '',
			lock: true,
			background: '#333',
			opacity: 0.87,
			drag: false,
		    resize: false,
			content: '<img src="/statics/arts/skins/icons/loading.gif" /> 采集处理中，请稍候..'
		});$('.aui_close').hide();
		$.post('/omg/putCollect',{},function(data){
			var list = art.dialog.list;
			for (var i in list) {
				list[i].close();
			};
			showmsg(data.msg,data.code);
			setTimeout(function(){location.reload();},1000);
		},'json');
	});
	$('.hoverTag').click(function(){
		_thish = $(this);
		art.dialog({
		    fixed: true,
		    content: '<div style="width:300px;text-align:left"><h3>项目亮点：</h3><p>'+_thish.attr('cons')+'</p><h3>市场分析：</h3><p>'+_thish.attr('cons_market')+'</p></div>',
		    width: '390px',
		    title: '项目详情'
		});
	});
})
</script>